Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing deviation timestamps #235

Conversation

mfiedorowicz
Copy link
Member

This pull request includes changes to the diode-server repository, specifically focusing on adding timestamp fields to deviation records and updating test cases accordingly. The most important changes include adding IngestionTs and LastUpdateTs fields to the deviation records and modifying test cases to validate these new fields.

Enhancements to Deviation Records:

  • Added IngestionTs and LastUpdateTs fields to the deviation records in the RetrieveDeviations and RetrieveDeviationByID methods in diode-server/dbstore/postgres/repository.go. [1] [2]

Updates to Test Cases:

  • Included time and github.com/stretchr/testify/assert imports in diode-server/reconciler/deviation_test.go.
  • Added IngestionTs and LastUpdateTs values to test deviation records in TestRetrieveDeviations and TestRetrieveDeviationByID functions. [1] [2] [3] [4]
  • Updated assertions in test cases to include checks for the new IngestionTs and LastUpdateTs fields. [1] [2]

Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
Copy link

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/dbstore/postgres 0.0% 0 0 0
🟢 PASS 1.25s github.com/netboxlabs/diode/diode-server/ingester 75.4% 9 0 0
🟢 PASS 1.06s github.com/netboxlabs/diode/diode-server/migrator 70.4% 4 0 0
🟢 PASS 0.01s github.com/netboxlabs/diode/diode-server/netbox 0.0% 0 0 0
🟢 PASS 1.76s github.com/netboxlabs/diode/diode-server/netboxdiodeplugin 78.9% 42 0 0
🟢 PASS 1.43s github.com/netboxlabs/diode/diode-server/reconciler 76.5% 41 0 0
🟢 PASS 1.09s github.com/netboxlabs/diode/diode-server/reconciler/applier 81.8% 1 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/reconciler/changeset 0.0% 0 0 0
🟢 PASS 1.32s github.com/netboxlabs/diode/diode-server/reconciler/differ 82.5% 92 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/server 85.7% 14 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/version 100.0% 1 0 0

Total coverage: 74.0%

@mfiedorowicz mfiedorowicz merged commit d6786ec into feat-postgres-implementation-and-enhancements Jan 16, 2025
3 checks passed
@mfiedorowicz mfiedorowicz deleted the fix-deviation-missing-timestamps branch January 16, 2025 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants